package com.woniuxy.mapper;

import com.woniuxy.entity.PowerUser;
import com.woniuxy.entity.PowerUserAndRole;
import com.woniuxy.entity.dto.PowerUserDTO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface PowerUserMapper {
    PowerUser queryPowerUser(PowerUser powerUser);
    PowerUser queryPowerUserById(Integer id);

    int updatePassword(@Param("username")String username,@Param("password")String password);

    int updatePerson(PowerUser powerUser);
    int updateImg(@Param("id") Integer id,@Param("imgSrc") String imgSrc);

    List<PowerUserDTO> queryAllPowerUser(PowerUserDTO powerUserDTO);

    int updateStatus(Integer id);

    int add(PowerUser powerUser);

    int addByRole(PowerUserAndRole powerUserAndRole);

    PowerUserDTO queryPower(Integer poweruserId);

    int updatePower(@Param("roleId")Integer roleId,@Param("poweruserId")Integer poweruserId);
}
